<include file="header" />

<body class="index-bg">
<div class="wraper">
	<div class="breastplate">
		<img src="/assets/base/bonsai/images/bg_top.png"/>
		<!--会场-->
		<div class="label top-label-2" data-type="2" <neq name="goodstypes" value="2">style="display:none;"</neq> ><img src="/assets/base/bonsai/images/huichang.png"/></div>
		<!--长期-->
		<div class="label top-label-3" data-type="3" <neq name="goodstypes" value="3">style="display:none;"</neq> ><img src="/assets/base/bonsai/images/extended.png"/></div>
	</div>
	<div class="assort-box">
	<volist name="category" id="vo">
		<a href="{BEESCRM::U('base/bonsai/goodsList',array('wechat_id'=>$wechat_id, 'cate_id'=>$vo['cate_id'], 'origin'=>$origin,))}">
			<div class="assort assort-{BEESCRM:$i}">
				<img src="{BEESCRM:$vo.image}"/>
				<span class="assort-name">{BEESCRM:$vo.cate_name}</span>
			</div>
		</a>
	</volist>	
	</div>
	<a href="javascript:void(0)" class="mode">模式<br/>选择</a>
	<include file="nav"/>
</div>
<div class="pop-box" id="pop-box1">
	<div class="menu clearfix">
		<div class="select-box pull-left goodsType"  data-type="2">
			<a href="javascript:;" class="menu-list">
				<p class="iconfont icon-text"></p>
				<p>会场布置</p>
			</a>
		</div>
		<div class="select-box pull-left menu-right goodsType" data-type="3">
			<a href="javascript:;" class="menu-list">
				<p class="iconfont icon-apartment"></p>
				<p>长期摆放</p>
			</a>
		</div>
	</div>
</div>
<div class="pop-box" id="pop-box2">
	<div class="menu clearfix">
		<div class="select-box pull-left left-self">
			<a href="javascript:;" class="menu-list">
				<p class="iconfont icon-xuanzebiaoji"></p>
				<p>自主选择方案</p>
			</a>
		</div>
		<div class="select-box pull-left menu-right">
			<a href="{BEESCRM::U('base/bonsai/cart', array('wechat_id' => $wechat_id,'provider'=>1,'theme'=>1, 'origin' => $origin))}" class="menu-list">
				<p class="iconfont icon-jiejuefangan"></p>
				<p>服务商提供方案</p>
			</a>
		</div>
	</div>
</div>

<include file="commonJs"/>
<script>
	var height = $(window).height();
	var width = $(window).width();
	var nav_h = $('.nav').height();
	$('body').css('minHeight',height);
	$('.assort-box').css('height',width);
	$('.wraper').css('paddingBottom',nav_h+8);
	
	
	
	$(document).on('click', '.goodsType', function(){
		var goodstype = $(this).data('type');
	
		Cookie.setCookie('goodstypes', goodstype);
		var goodstypes = Cookie.getCookie('goodstypes');
		//console.log(goodstypes);
		if(goodstypes == 2){
			$('.top-label-3').hide();
			$('.top-label-2').show();
		}else if(goodstypes == 3){
			$('.top-label-2').hide();
			$('.top-label-3').show();
		} 
		$('#pop-box1').fadeOut(20);
		$('#pop-box2').fadeIn(300);
	});
	
	$('.left-self').click(function(){
		$('#pop-box2').fadeOut(300);
	});
	//切换模型
	$(document).on('click', '.mode', function(){
		$('#pop-box1').show();
	});
	

	function myfun(){
		var goodstypess = Cookie.getCookie('goodstypes');
		var goodstypes = "{BEESCRM:$goodstypes}";
		if(!goodstypes && !goodstypess){
			$('#pop-box1').show();
		}else{
			if((goodstypes==2) || (goodstypess==2) ){
				$('.top-label-2').show();
				$('.top-label-3').hide();				
			}else if((goodstypes==3) || (goodstypess==3)){
				$('.top-label-3').show();
				$('.top-label-2').hide();				
			} 
		}
	}
	window.onload = myfun;
</script>
</body>
</html>
